package com.rop.system.custom;

import com.rop.model.system.SysUser;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

/**
 * @Title: CustomerUser
 * @Author Rop
 * @Date 2023/5/12 11:44
 * @description: 自定义用户类
 */

public class CustomerUser extends User {

    /**
     * 自己的实体
     */
    private SysUser sysUser;

    public CustomerUser(SysUser sysUser, Collection<? extends GrantedAuthority> authorities) {
        super(sysUser.getUsername(), sysUser.getPassword(), authorities);
        this.sysUser = sysUser;
    }

    public SysUser getSysUser() {
        return sysUser;
    }

    public void setSysUser(SysUser sysUser) {
        this.sysUser = sysUser;
    }
}
